package com.example.commons;

import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * Created by Renzhiping on 2018/1/16.
 */
@Component
public class ApplicationConfig extends WebMvcConfigurerAdapter{
    @Override
    public void addInterceptors( InterceptorRegistry registry ) {
        registry.addInterceptor(new Interceptor()).addPathPatterns("/**");
        super.addInterceptors(registry);
    }
}
